<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        #big {
            width: 300px;
            height: 300px;
            background-color: red;
        }

        #erwa {
            width: 200px;
            height: 200px;
            background-color: blue;
        }

        #sanwa {
            width: 100px;
            height:100px ;
            background-color: white;
        }
    </style>
</head>

<body>

    <div id="app">
        <div id="big" @click.stop='say("大娃",$event)'>
            <div id="erwa" @click.stop='say("2娃",$event)'>
                <div id="sanwa"  @click.stop='say("3娃",$event)'>
                    <a @click.stop.prevent ='fn2' href="https://www.baidu.com/">baidu</a>
                </div>
            </div>
            
        </div>
    </div>


    <!-- 开发环境版本，包含了有帮助的命令行警告 -->
    <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
    <script>

        var vm = new Vue({
            // 监管的容器 
            el: '#app',
            // 数据定义
            data: {
                msg: 'helloworld',
                msg2: '你好世界'
            },
            methods:{
                say(name,e) {
                    console.log('say',name)
                },
                fn2() {
                    console.log('fn2')
                }
            }
        })





    </script>
</body>

</html>